package code.remote {

import com.adobe.crypto.MD5;

import mx.rpc.events.ResultEvent;
	

public class UserLoginRequest extends AbstractRequest {
	
	private var _username: String;
	private var _password: String;
	
	public function UserLoginRequest(username: String, password: String) {
		super("user_login");
		
		_username = username;
		_password = password;
	}
	
	protected final override function getXmlData(): String {
		return '<Request><UserCredentials>' +
					'<Username><![CDATA[' + _username + ']]></Username>' + 
					'<Password><![CDATA[' + MD5.hash(_password) + ']]></Password>' + 
				'</UserCredentials></Request>';
	}
	
	protected final override function onResult(event: ResultEvent): void {
		// nothing to do
	}
}
}